package edu.hz.enums;

import lombok.Getter;

@Getter

public enum Gender {

    UNKNOW(0),
    FEMALE(1),
    MALE(2);

    private final int value;

    Gender(int value) {
        this.value = value;
    }

    public static Gender fromValue(int value) {
        for (Gender gender: Gender.values()) {
            if (gender.getValue() == value) {
                return gender;
            }
        }
        return UNKNOW;
    }



}
